//# sourceURL=http://uMapApp/UI/Panel/PanelBlock/TreeBlock
define([
    "mhjs/mhjs",
    "./PanelBlock",
    "../../Tree/Tree"
], function (
    mhjs,
    PanelBlock,
    Tree
) {

    function TreeBlock(option) {

        var _this = this;
        _this.isOpened = false;

        PanelBlock.call(_this, option);
        _this.addClass("treeBlock");

        _this.tree = new Tree();
        _this.ui.wrap.append(_this.tree);

    }

    var _class = TreeBlock;
    mhjs.Inherit(_class, PanelBlock);


    Object.defineProperties(_class.prototype, {
        "list" : {
            set: function (list) {
                var _this = this;
                _this.clear();
                _this.tree.list = list;
            },
            get: function () {
                return this._list;
            }
        },
        "clear": {
            value: function () {
                var _this = this;
                _this.tree.clear();
                _this._list = [];
            }
        }
    });

    return _class;

});